package com.beiding.dao.impl;

import com.beiding.dao.CommonOperations;
import com.beiding.pojo.StaticResource;
import org.springframework.data.mongodb.core.MongoOperations;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Repository;

@Repository
public class ResourceDaoImpl implements CommonOperations<StaticResource> {

    private MongoTemplate mongo;

    public ResourceDaoImpl(MongoTemplate mongo) {
        this.mongo = mongo;
    }

    @Override
    public Class<StaticResource> type() {
        return StaticResource.class;
    }

    @Override
    public MongoOperations mongoOperations() {
        return mongo;
    }
}
